
# cd ..
# make
# kill -9 $(sudo lsof -i tcp:9981 -t)
# kill -9 $(sudo lsof -i tcp:9982 -t)
# ./socks4a 9981 &
# ./socks4a_noSync 9982 &
# sudo systemd-resolve --statistics
cd ./test
tempFile="tempfile____x"
port=9982
if [ $# -ne 1 ];then
    ./domain.py > $tempFile
    port=9981
fi
truncate --size 0 log$port
#!/bin/bash
start=$(date "+%s")
#do something
export TIME="\t%E real,\t%U user,\t%S sys"
while read line;
do
    /usr/bin/time -a -o log$port timeout 100s curl --socks4a 127.0.0.1:$port $line &
    # /usr/bin/time -a -o log$port ./socks4a_test_more &
    echo -e "curl --socks4a 127.0.0.1:$port $line\n"
done < $tempFile
N="10 log$port"
sleep 20
echo "开始计算总时间"
./totalTime log$port > out$port
